﻿alert('In the script file');
alert(GetSelectedItemsId());
function GetSelectedItemsId() {
    var ctx = SP.ClientContext.get_current();
    var items = SP.ListOperation.Selection.getSelectedItems(ctx);
    var selectedItems = '';
    for (index in items) {
        selectedItems = selectedItems + ',' + items[index].id;
    }    
    return selectedItems;
}

function EnableButton() {
    var ctx = SP.ClientContext.get_current();
    var items = SP.ListOperation.Selection.getSelectedItems(ctx);
    alert('Enable Button Fire');
    return items.length > 0;
}